"""
# -*- coding: utf-8 -*-
# @Time    : 2023/6/13 17:00
# @Author  : 王摇摆
# @FileName: estimator.py
# @Software: PyCharm
# @Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
"""
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split

iris = load_iris()
X_train, X_test, y_train, y_test = train_test_split(iris['data'],
                                                    iris['target'],
                                                    test_size=0.2)

print('The size of X_train is ', X_train.shape)
print('The size of y_train is ', y_train.shape)
print('The size of X_test is ', X_test.shape)
print('The size of y_test is ', y_test.shape)

y_pred = model.predict( X_test )
p_pred = model.predict_proba( X_test )
print( y_test, '\
' )
print( y_pred, '\
' )
print( p_pred )